package com.headwind.logistics.permission.service.impl;

import com.headwind.logistics.permission.mapper.DepartmentMapper;
import com.headwind.logistics.common.pojo.Department;
import com.headwind.logistics.permission.service.intl.DepartmentServiceIntl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 部门业务逻辑层实现类
 */
@Service
public class DepartmentServiceImpl implements DepartmentServiceIntl {

    //部门数据访问层
    @Resource
    private DepartmentMapper departmentMapper;

    /**
     * 获取全部部门信息
     * @param page
     * @param rows
     * @return
     */
    @Override
    public List<Department> queryAllDepartment(Integer page, Integer rows) {
        if (page != null){
            page = (page-1)*rows;
        }
        return departmentMapper.queryAllDepartment(page, rows);

    }
}







